<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>用户列表</title>
  <!-- 引入 Bootstrap -->
  <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>

<style>
    a{
        color: #ffffff;
    }
    h2{
        /*文字对齐*/
        text-align: center;
    }
</style>

<body>
<!--&lt;!&ndash;一开始写一个登录成功&ndash;&gt;-->
<!--<h2>登录成功</h2>-->

<h2>springboot-17期查询首页</h2>
<div style="width:600px;height:100%;margin-left:270px;">
  <form th:action="@{'/emp/showTopone'}" method="post">
    员工编号：<input class="form-control" type="text" th:value="${empno}" name="empno"/>
    <button class="btn btn-primary btn-lg btn-block">查询</button>
  </form>
</div>
<table class="table table-striped table-bordered table-hover text-center">
<thead>
<tr style="text-align: center">
  <th>员工编号</th>
  <th>员工姓名</th>
  <th>工作</th>
  <th>直属领导</th>
  <th>入职时间</th>
  <th>薪资</th>
  <th>津贴</th>
  <th>部门编号</th>
  <th>操作</th>
</tr>
</thead>
<tr th:each="emp:${emps}">
  <td th:text="${emp.empno}"></td>
  <td th:text="${emp.ename}"></td>
  <td th:text="${emp.job}"></td>
  <td th:text="${emp.mgr}"></td>
  <td th:text="${emp.hiredate}"></td>
  <td th:text="${emp.sal}"></td>
  <td th:text="${emp.comm}"></td>
  <td th:text="${emp.deptno}"></td>
  <td>
    <button class="btn btn-success"><a th:href="@{'/emp/updatePage/'+${emp.empno}}">修改</a></button>
    <button class="btn btn-danger"><a th:href="@{'/emp/delete/'+${emp.empno}}">删除</a></button>
  </td>
</tr>
</table>
<button class="btn btn-primary"><a th:href="@{'/emp/add'}">添加用户</a></button>


</body>

</html>